package main

import "fmt"

func main() {
	arr := []int{15, 12, 38, 14, 25}
	min, max := minAndMax(arr)

	fmt.Printf("minAndMax(arr) min: %d  max: %d ", min, max)
}

func minAndMax(arr []int) (min, max int) {
	min = arr[0]
	max = arr[0]
	for _, v := range arr {
		if v < min {
			min = v
		}
		if v > max {
			max = v
		}
	}
	return
}
